package com.hightrast.service.compareToData.stage.impl;

import com.hightrast.service.api.entity.RastProductVariants;
import com.hightrast.service.compareToData.stage.EntityComparator;

import java.util.Objects;

/**
 * 商品变体 比较策略实现
 */
public class RastProductVariantComparator implements EntityComparator<RastProductVariants> {
    @Override
    public boolean areEqual(RastProductVariants newEntity, RastProductVariants oldEntity) {
        return Objects.equals(newEntity.getProductId(), oldEntity.getProductId()) &&
                Objects.equals(newEntity.getTitle(), oldEntity.getTitle()) &&
                Objects.equals(newEntity.getOption1(), oldEntity.getOption1()) &&
                Objects.equals(newEntity.getOption2(), oldEntity.getOption2()) &&
                Objects.equals(newEntity.getOption3(), oldEntity.getOption3()) &&
                Objects.equals(newEntity.getFulfillmentService(), oldEntity.getFulfillmentService()) &&
                Objects.equals(newEntity.getSku(), oldEntity.getSku()) &&
                Objects.equals(newEntity.getImageId(), oldEntity.getImageId())
                ;
    }
}